using System;
using System.Collections.Generic;

namespace Voodoo.Sauce.Internal.SDKs
{
	[Serializable]
	public class MediationSDK : SDK
	{
		public List<AdNetworkSDK> adNetworks;

		public List<SDK> otherUtilitySdk;

		public override bool Equals(object obj)
		{
			if (obj == null || GetType() != obj.GetType())
			{
				return false;
			}
			MediationSDK mediationSDK = (MediationSDK)obj;
			if (adNetworks?.Count != mediationSDK.adNetworks?.Count || !base.Equals((object)mediationSDK))
			{
				return false;
			}
			for (int i = 0; i < adNetworks?.Count; i++)
			{
				if (!adNetworks[i].Equals(mediationSDK.adNetworks?[i]))
				{
					return false;
				}
			}
			if (otherUtilitySdk?.Count != mediationSDK.otherUtilitySdk?.Count)
			{
				List<SDK> list = otherUtilitySdk;
				if (list == null || list.Count <= 0)
				{
					List<SDK> list2 = mediationSDK.otherUtilitySdk;
					if (list2 == null || list2.Count <= 0)
					{
						goto IL_018a;
					}
				}
				return false;
			}
			goto IL_018a;
			IL_018a:
			for (int j = 0; j < otherUtilitySdk?.Count; j++)
			{
				if (!otherUtilitySdk[j].Equals(mediationSDK.otherUtilitySdk?[j]))
				{
					return false;
				}
			}
			return true;
		}

		public override int GetHashCode()
		{
			int num = ((adNetworks != null) ? adNetworks.GetHashCode() : 0);
			int num2 = ((otherUtilitySdk != null) ? otherUtilitySdk.GetHashCode() : 0);
			if (num != 0 && num2 != 0)
			{
				return num ^ num2;
			}
			if (num == 0 && num2 != 0)
			{
				return num2;
			}
			if (num != 0 && num2 == 0)
			{
				return num;
			}
			return 0;
		}
	}
}
